package com.iotechn.unimall.app.api.running;

/*
@author kbq
@date  2019/7/4 - 21:36
*/

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.RunningGroupDO;

@HttpOpenApi(group = "running.group", description = "跑步组")
public interface RunningGroupService {

    @HttpMethod(description = "获取当前用户跑团组的信息")
    public RunningGroupDO getRunningGroupInfo(@NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户Id") Long userId);

    @HttpMethod(description = "通过邀请码加入跑步组")
    public Boolean joinGroup( @NotNull @HttpParam(name = "inviteCode", type = HttpParamType.COMMON, description = "邀请码") String inviteCode,@NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户Id") Long userId) throws ServiceException;

    @HttpMethod(description = "更新跑步组信息")
    public Boolean updateGroupInfo( @NotNull @HttpParam(name = "groupName", type = HttpParamType.COMMON, description = "组名称") String groupName, @NotNull @HttpParam(name = "inviteCode", type = HttpParamType.COMMON, description = "邀请码") String inviteCode,@NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户Id") Long userId) throws ServiceException;

    @HttpMethod(description = "新增/修改跑步组信息")
    public Boolean addGroupInfo( @NotNull @HttpParam(name = "groupName", type = HttpParamType.COMMON, description = "组名称") String groupName, @NotNull @HttpParam(name = "inviteCode", type = HttpParamType.COMMON, description = "邀请码") String inviteCode,@NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户Id") Long userId) throws ServiceException;


}
